echo "ERROR: /sbin/livecd-functions.sh could not be loaded!"
exit 1
fi
livecd_check_root || exit 1
if [ -z "${1}" ]
then
echo "ERROR: please specify a network interface"
exit 1
else
iface="${1}"
fi
[ ! -d /tmp/setup.opts ] && mkdir /tmp/setup.opts
cd /tmp/setup.opts
dialog --title "Network setup" --menu "This script is designed to setup both wired and wireless network settings. All questions below apply to the ${iface} interface only. Choose one option:" 20 60 7 1 "My network is wireless" 2 "My network is wired" 2> ${iface}.WIRED_WIRELESS
WIRED_WIRELESS="$(cat ${iface}.WIRED_WIRELESS)"
case ${WIRED_WIRELESS} in
1)
livecd_config_wireless
livecd_config_ip
livecd_write_wireless_conf
;;
2)
livecd_config_ip
;;
*)
exit 0
;;
esac
livecd_write_net_conf
echo "Type \"ifconfig\" to make sure the interface was configured correctly."